<?php

namespace App\Library\Requests\Base;

class BaseMobileRequest extends BaseDTORequest
{
    public function rules(): array
    {
        return [
            'mobile' => 'required|string|size:11|regex:' . __('com.mobileReg')
        ];
    }

    /**
     * 验证错误信息.
     *
     * @return array
     */
    public function messages(): array
    {
        return [
            'mobile.regex' => __('com.mobileTip'),
        ];
    }
}
